package com.ruicar.afs.cloud.channel.common.mq.sender.impl;

import com.ruicar.afs.cloud.channel.cardealer.condition.CarDealerCondition;
import com.ruicar.afs.cloud.channel.witness.entity.ChannelWitnessInfoTemp;
import com.ruicar.afs.cloud.common.modules.dto.mq.affiliation.AffiliationDto;
import com.ruicar.afs.cloud.common.modules.dto.mq.affiliation.AffiliationRelDto;
import com.ruicar.afs.cloud.common.modules.dto.mq.affiliation.AffiliationRelInfo;
import com.ruicar.afs.cloud.common.mq.rabbit.message.AfsTransEntity;
import com.ruicar.afs.cloud.common.mq.rabbit.message.MqTransCode;
import com.ruicar.afs.cloud.parameter.commom.entity.VeBrand;
import com.ruicar.afs.cloud.parameter.commom.entity.VeMain;
import lombok.AllArgsConstructor;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Ice
 * @date 2020/8/22 16:07
 */
@Service
@AllArgsConstructor
public class SenderChannelToCaseImpl {

    public AfsTransEntity<ChannelWitnessInfoTemp> sendWitnessToCase(ChannelWitnessInfoTemp temp) {
        AfsTransEntity<ChannelWitnessInfoTemp> transEntity = new AfsTransEntity<>();
        transEntity.setTransCode(MqTransCode.AFS_CHANNEL_CHANNEL_CASE_CTM_SAVE_WITNESS);
        transEntity.setData(temp);
        return transEntity;
    }

    public AfsTransEntity<List<VeBrand>> sendVeBrand(List<VeBrand> temp) {
        AfsTransEntity<List<VeBrand>> transEntity = new AfsTransEntity<>();
        transEntity.setTransCode(MqTransCode.AFS_CHANNEL_CHANNEL_CASE_CTM_SEND_VEHICLE_BRAND_CASE);
        transEntity.setData(temp);
        return transEntity;
    }

    public AfsTransEntity<List<VeMain>> sendVeMain(List<VeMain> temp) {
        AfsTransEntity<List<VeMain>> transEntity = new AfsTransEntity<>();
        transEntity.setTransCode(MqTransCode.AFS_CHANNEL_CHANNEL_CASE_CTM_SEND_VEHICLE_MAIN_CASE);
        transEntity.setData(temp);
        return transEntity;
    }

    public AfsTransEntity<CarDealerCondition> sendCommonCarDealerToCase(CarDealerCondition temp) {
        AfsTransEntity<CarDealerCondition> transEntity = new AfsTransEntity<>();
        transEntity.setTransCode(MqTransCode.CHANNEL_COMMONC_CAR_DEALER_TO_CASE);
        transEntity.setData(temp);
        return transEntity;
    }


}
